package com.chinasoft.news.service;

import com.chinasoft.news.pojo.Articles;
import com.chinasoft.news.pojo.ArticlesAddVo;
import com.chinasoft.news.pojo.ArticlesAndCate;
import com.chinasoft.news.pojo.Page;
import com.github.pagehelper.PageInfo;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

public interface ArticlesService {

    Boolean addArticles(ArticlesAddVo addVo, String file,Integer id);

    PageInfo<ArticlesAndCate> getPagesAll();

    List<ArticlesAndCate> getArticlesAll(Integer pagenum,Integer pagesize);

    PageInfo<ArticlesAndCate> getPageSelect(Integer cate_id,  String state);

    List<ArticlesAndCate> getSelectByCateIdAndState(Integer pagenum,Integer pagesize,Integer cate_id,String state);

    PageInfo<ArticlesAndCate> getPageCateId(Integer cate_id);

    List<ArticlesAndCate> getByCateId(Integer pagenum,Integer pagesize,Integer cate_id);

    PageInfo<ArticlesAndCate> getPageState(String state);

    List<ArticlesAndCate> getByState(Integer pagenum,Integer pagesize,String state);

    Boolean deleteArticles(Integer id);

    Articles getArticlesById(Integer id);

    Boolean updateArticlesById(String title,String state,Integer id);


}
